Jiaqi Chen (jc5681), Xinran Sun (xs2447), Yiru Gong (yg2832), Yunlin Zhou (yz4184)
happy_df = readxl::read_xls('DataPanelWHR2021C2.xls') %>%
janitor::clean_names()
happy_iso3 = happy_df %>%
subset(
country_name != "Kosovo" & country_name != "Somaliland region"
) %>%
mutate(
country_code = countrycode(country_name, "country.name", "iso3c")
) %>%
relocate(country_code)
plot_2018_map = happy_iso3 %>%
filter(year == 2018) %>%
plot_ly(
type = 'choropleth', locations = ~country_code, z = ~life_ladder,
text = ~country_name
)
plot_2018_map
barplot
line plot